<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>alarm dashboard</title>

    <link rel="stylesheet" type="text/css" href="/static/css/bootstrap.css">
    <link rel="stylesheet" href="/static/css/g.css"/>
    <link rel="shortcut icon" href="/static/img/logo.png">

    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js/bootstrap.js"></script>
    <script src="/static/layer/layer.min.js"></script>
    <script src="/static/js/g.js"></script>

</head>
<body>
<div style="padding: 10px;">
    <div class="panel panel-danger">
        <div class="panel-heading">
            <h3 class="panel-title">未恢复的报警</h3>
        </div>
        <div class="panel-body">
            <div class="alarms">
                {{range .Events}}
                <div class="alarm">
                    <input type="checkbox" alarm="{{.Id}}">
                    [P{{.Priority}} #{{.CurrentStep}}/{{.MaxStep}}] {{.Counter}}<br>
                    <span style="padding-left:17px;">{{.Func}} {{.LeftValue}}{{.Operator}}{{.RightValue}} {{.Note}}</span>
                    <span class="orange">{{duration $.Now .Timestamp}}</span>
                    <span class="gray">[</span>
                    <a href="{{.Link}}" target="_blank">config</a>
                    <span class="cut-line">¦</span>
                    <a href="javascript:solve('{{.Id}}');">solved</a>
                    <span class="gray">]</span>
                </div>
                <hr>
                {{end}}
                <a href="javascript:all_select();">全选</a>/<a href="javascript:reverse_select();">反选</a>
                <button class="btn btn-warning btn-sm" onclick="batch_solve();">标记选中部分为已解决</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>